<?php
require_once $_site->get_viewpath("boss/common/authcheck");
require_once $_site->get_viewpath("mobile/common/header");

//查询账号信息
$boss_objet=new boss();
$cols='id,account,name,email,sex,phone';
$boss_info=$boss_objet->boss_info($cols);
?>	
<link href="/static/mobile/css/mui.picker.css" rel="stylesheet" />
<link href="/static/mobile/css/mui.poppicker.css" rel="stylesheet" />
<script src="/static/mobile/js/mui.picker.js"></script>
<script src="/static/mobile/js/mui.poppicker.js"></script>
</head>

	<body>
		<div class="headertwo clearfloat" id="header">
			<a href="/boss/center" class="fl box-s"><i class="iconfont icon-arrow-l fl"></i></a>
			<p class="fl">账号设置</p>
		</div>
		
		<div class="pay clearfloat" id="main">
			
			<div class="land-ctent clearfloat pay-bottom">
			<form action="/handle.php" method="post" id="formedit">
			<input type="hidden" name="h" value="boss/edit">
				<ul>
					<li class="box-s clearfloat">
						<p class="tit fl">登录账号</p>
						<p class="xinxi fr"><?php echo $boss_info['account'];?></p>
					</li>
					<li class="box-s clearfloat">
						<p class="tit fl">姓名</p>
						<input type="text" name="name" value="<?php echo $boss_info['name'];?>" placeholder="请输入联系人姓名" class="fl day" />						
					</li>
					<li class="box-s clearfloat">
						<p class="tit fl">电话</p>
						<input type="text" name="phone" value="<?php echo $boss_info['phone'];?>" placeholder="请输入联系电话" class="fl day" />						
					</li>	
					<li class="box-s clearfloat">
						<p class="tit fl">邮箱</p>
						<input type="text" name="email" value="<?php echo $boss_info['email'];?>" placeholder="请输入邮箱地址" class="fl day" />						
					</li>																				
					<li class="box-s clearfloat">
						<p class="tit fl">性别</p>
						<input type="text" name="" id="showUserPicker" value="<?php echo $boss_info['sex']==0?'男':'女';?>" placeholder="请选择性别" readonly="readonly" class="fl day" />
						<input type="hidden" name="sex" id="showUserSexval" value="<?php echo $boss_info['sex'];?>" />
						<i class="iconfont icon-arrowright fl"></i>
					</li>
				</ul>				
				<button type="button" onclick="ajaxpost('formedit')" class="pay-btn clearfloat">保存设置</button>				
			</form>	
			</div>
		</div>
		
        <script>
			(function($, doc) {
				$.init();
				$.ready(function() {
					//普通示例
					var userPicker = new $.PopPicker();
					userPicker.setData([{value:'0',text:'男'}, {value:'1',text:'女'}]);
					var showUserPickerButton = doc.getElementById('showUserPicker');					
					showUserPickerButton.addEventListener('tap', function(event) {
						userPicker.show(function(items) {
							doc.getElementById('showUserPicker').value = items[0].text;
							doc.getElementById('showUserSexval').value=items[0].value;
						});
					}, false);					
				});
			})(mui, document);
		</script>		
		
	</body>

</html>
